package com.hotel.controller;

import com.github.pagehelper.PageInfo;
import com.hotel.pojo.User;
import com.hotel.service.PageService;
import com.hotel.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author shkstart  分页控制器（暂未实现）
 * @create 2021-06-29 11:18
 */
@Controller
public class PageController {

    @Autowired(required = false)
    PageService pageService;

//    @GetMapping("index")
//    public String adminIndex(User user, Model model,
//                             @RequestParam(required = true, value = "pageNum", defaultValue = "1") Integer pageNum,
//                             @RequestParam(required = true, value = "pageSize", defaultValue = "5") Integer pageSize
//    ) {
//
//        PageInfo<User> pageInfo = pageService.selectRoleList(pageNum, pageSize, user);
//        model.addAttribute("username", user.getUsername());
//        model.addAttribute("pageInfo", pageInfo);
//        return "admin/role/setup";
//    }

}
